<template>
  <div class="box">
    <div class="first">
      <el-card class="box-card">
        <p>近7天合同金额</p>
        <div class="center">
          <span>9.8921</span>
          <span>+2560.78</span>
        </div>
        <div class="bottom">
          <span>上周新增了</span>
          <span>+14.07</span>
        </div>
      </el-card>
      <el-card class="box-card">
        <p>近30天合同金额</p>
        <div class="center">
          <span>9.8921</span>
          <span>+2560.78</span>
        </div>
        <div class="bottom">
          <span>上周新增了</span>
          <span>+14.07</span>
        </div>
      </el-card>
      <el-card class="box-card">
        <p>新增合同数</p>
        <div class="center">
          <span>9.8921</span>
          <span>+2560.78</span>
        </div>
        <div class="bottom">
          <span>上周新增了</span>
          <span>+14.07</span>
        </div>
      </el-card>
      <el-card class="box-card">
        <p>新增客户数</p>
        <div class="center">
          <span>9.8921</span>
          <span>+2560.78</span>
        </div>
        <div class="bottom">
          <span>上周新增了</span>
          <span>+14.07</span>
        </div>
      </el-card>
    </div>
    <div class="second">
      <el-row :gutter="20">
        <el-col :span="16">
          <el-card class="box-card">
            <div slot="header" class="top">
              <div class="sale">
                <span>本年每月合同金额</span>
                <span>具体销售额</span>
              </div>
              <i class="el-icon-more"></i>
            </div>
            <div class="bottom">
              <div class="left">
                <div class="list">
                  <span>本月合同金额</span>
                  <span>￥31.042.66</span>
                  <span><i class="el-icon-top-right"></i>1.613.00</span>
                </div>
                <div class="list">
                  <span>今日合同金额</span>
                  <span>￥31.042.66</span>
                  <span><i class="el-icon-top-right"></i>1.613.00</span>
                </div>
                <div class="list">
                  <span>上月合同金额</span>
                  <span>￥31.042.66</span>
                  <span><i class="el-icon-top-right"></i>1.613.00</span>
                </div>
              </div>
              <div class="right">
              </div>
            </div>
          </el-card>
        </el-col>
        <el-col :span="8">
          <el-card class="box-card" style="flex:1">
            <div slot="header" class="top">
              <div class="sale">
                <span>收入统计</span>
                <span>具体销售额</span>
              </div>
              <i class="el-icon-more"></i>
            </div>
            <div class="bottom">
              下面图表
            </div>
          </el-card>
        </el-col>
      </el-row>
    </div>
    <div class="third">
      <el-row :gutter="20">
        <el-col :span="16">
          <el-card class="box-card">
            <div class="top">
              <div class="sale">
                <span>本年每月销售额</span>
                <span>具体销售额</span>
              </div>
            </div>
            <el-table :data="tableData" style="width: 100%;color:black">
              <el-table-column prop="ranking" label="排名" align="center" width="50px">
              </el-table-column>
              <el-table-column prop="name" label="姓名" align="center">
              </el-table-column>
              <el-table-column prop="theLastWeek" label="较上周" align="center">
              </el-table-column>
              <el-table-column prop="department" label="部门" align="center">
              </el-table-column>
              <el-table-column prop="amountOfSales" label="销售额" align="center">
              </el-table-column>
              <el-table-column prop="ctr" label="点击率" align="center">
              </el-table-column>
              <el-table-column prop="manipulate" label="操作" align="center">
              </el-table-column>
            </el-table>
          </el-card>
        </el-col>
        <el-col :span="8">
          <el-card class="box-card" style="flex:1">
            <div class="top">
              <div class="sale">
                <span>销售订单排名</span>
                <span>销售统计排名</span>
              </div>
            </div>
            <el-table :data="tableData2" style="width: 100%;color:black">
              <el-table-column prop="ranking" label="排名" align="center" width="50px">
              </el-table-column>
              <el-table-column prop="name" label="姓名" align="center">
              </el-table-column>
              <el-table-column prop="ctr" label="点击率" align="center">
              </el-table-column>
              <el-table-column prop="or" label="涨幅" align="center">
              </el-table-column>
            </el-table>
          </el-card>
        </el-col>
      </el-row>
    </div>
  </div>
</template>
<script>

export default {
  components: {},
  data() {
    return {
      tableData: [{
        ranking: '1',
        name: '王小虎',
        theLastWeek: '5%',
        department: '销售部',
        amountOfSales: '12.346k',
        ctr: '12.34k',
        manipulate: '+34.34%'
      }, {
        ranking: '1',
        name: '王小虎',
        theLastWeek: '5%',
        department: '销售部',
        amountOfSales: '12.346k',
        ctr: '12.34k',
        manipulate: '+34.34%'
      },
        {
          ranking: '1',
          name: '王小虎',
          theLastWeek: '5%',
          department: '销售部',
          amountOfSales: '12.346k',
          ctr: '12.34k',
          manipulate: '+34.34%'
        },
        {
          ranking: '1',
          name: '王小虎',
          theLastWeek: '5%',
          department: '销售部',
          amountOfSales: '12.346k',
          ctr: '12.34k',
          manipulate: '-14.34%'
        },
        {
          ranking: '1',
          name: '王小虎',
          theLastWeek: '5%',
          department: '销售部',
          amountOfSales: '12.346k',
          ctr: '12.34k',
          manipulate: '+34.34%'
        }
      ],
      tableData2: [{
        ranking: '1',
        name: '王小虎',
        ctr: '12.34k',
        or: '+34.34%'
      },
        {
          ranking: '1',
          name: '王小虎',
          ctr: '12.34k',
          or: '+34.34%'
        },
        {
          ranking: '1',
          name: '王小虎',
          ctr: '12.34k',
          or: '+34.34%'
        },
        {
          ranking: '1',
          name: '王小虎',
          ctr: '12.34k',
          or: '+34.34%'
        },
        {
          ranking: '1',
          name: '王小虎',
          ctr: '12.34k',
          or: '+34.34%'
        }
      ]
    }
  }
}
</script>
<style lang="scss">

.box {
  .first {
    display: flex;

    .box-card {
      width: 400px;
      margin: 10px 10px;


      p {
        font-weight: bold;
      }

      .center {
        display: flex;
        justify-content: space-between;

        span {
          font-size: 25px;
          font-weight: bold;
        }

        :last-child {
          color: red;
        }
      }

      .bottom {
        display: flex;
        justify-content: space-between;

        span {
          margin-top: 20px;
          font-size: 14px;
          color: #aaa;

        }

        :last-child {
          color: red;
        }
      }
    }
  }

  .second {
    //display: flex;
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;

    .box-card {

      .top {
        display: flex;
        justify-content: space-between;

        .sale {
          display: flex;
          flex-direction: column;

          :last-child {
            color: #aaa;
            margin-top: 5px;
            font-size: 14px;
          }

        }
      }

      .bottom {
        display: flex;
        margin-top: 8px;
        min-height: 285px;

        .left {
          .list {
            display: flex;
            flex-direction: column;
            margin-bottom: 20px;

            :nth-child(1) {
              color: #aaa;
              font-size: 14px;
            }

            :nth-child(2) {
              color: black;
              font-size: 20px;
              font-weight: bold;
              margin: 5px 0;
            }

            :nth-child(3) {
              font-size: 14px;

              i {
                margin-right: 10px;
              }
            }
          }
        }

        .right {
          width: 100%;
          height: 100%;
        }
      }
    }
  }

  .third {
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
    margin-top: 10px;

    .box-card {

      .top {
        display: flex;
        justify-content: space-between;
        margin-bottom: 20px;

        .sale {
          display: flex;
          flex-direction: column;

          :last-child {
            color: #aaa;
            margin-top: 5px;
            font-size: 14px;
          }
        }
      }
    }
  }
}
</style>
<style scoped>
.el-card__header {
  padding: 18px 20px 0px 20px;
  border-bottom: 0px solid #e6ebf5 !important;
}
</style>
